import java.util.Scanner;

public class find {//顺序
    public static int search(int n){
        int[] a={12,34,50,0,11,22};

        for(int i=0;i<a.length;i++){
            if(a[i]==n){
                return i;
            }
        }
        return -1;
    }
    public static int search1(int[] n,int p){
        for(int i=0;i<n.length;i++){
            if(n[i]==p){
                return i;
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        int[] a=new int[1000];
        Scanner sc=new Scanner(System.in);
        for(int i=0;i<10;i++){
            a[i]=sc.nextInt();
        }
        int y=search(0);
        int n=search1(a,0);
        System.out.println(y);
        System.out.println(n);
    }
}
